package models

import (
	uuid "github.com/satori/go.uuid"
	"gorm.io/gorm"
)

type SysUser struct {
	gorm.Model
	UUID        uuid.UUID    `json:"uuid" gorm:"comment:用户 UUID"`
	Username    string       `json:"username" gorm:"comment:用户名"`
	Password    string       `json:"password" gorm:"comment:密码"`
	NickName    string       `json:"nickname" gorm:"default:系统用户;comment:昵称"`
	HeaderImage string       `json:"headerImage" gorm:"default:https://developer.mozilla.org/static/media/m-logo.e19e04547be91a35c8ea.svg;comment:头像"`
	Authority   SysAuthority `json:"authority" gorm:"foreignKey:AuthorityId;references:AuthorityId;comment:角色"`
	AuthorityId string       `json:"authorityId" gorm:"comment:角色 ID"`
}
